package com.xxl.job.hansonxxljob.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author Hanson
 * @date 2023/2/13 16:43
 */
@Component
@ConfigurationProperties(prefix = "xxl-job")
@Data
public class XxlJobBeanConfig {
    //@Value("${}")
    private Admin admin;
    private Executor executor;
    private String accessToken;

    @Data
    public static class Executor {
        private String appName;
        private String ip;
        private int port;
        private String logPath;
        private int logRetentionDays;
    }

    @Data
    public static class Admin {
        private String addresses;
    }
}

